import cv2
import numpy as np
# bgr3三层通道
img = np.zeros((480, 640, 3), np.uint8)

print(img[100, 100])
count = 0
# RGBA(254, 231, 191, 1)
while count < 200:
    # bgr 三层 蓝（B）、绿（G）红（R））、三通道分别赋值
    # img[count, 100, 0] = 191
    # img[count, 100, 1] = 255
    # img[count, 100, 2] = 254
    # 另一种写法
    img[count, 100] = [191, 255, 254]
    count = count + 1

cv2.imshow('img', img)
key = cv2.waitKey(0)
if (key & 0xFF == ord('q')):
    cv2.destroyAllWindows()
